package com.rs.game.player.dialogues;

import com.rs.game.player.content.MakePlank;
import com.rs.utils.ShopsHandler;

public class Sawmill extends Dialogue {
	
	private int npcId;

	@Override
	public void start() {
		npcId = (Integer) parameters[0];
		sendNPCDialogue(npcId, 9827, "Hello! Would you like to make your own planks? You may also buy the planks for double the price if you don't have the logs.");
	}

	@Override
	public void run(int interfaceId, int componentId) {
		switch (stage) {
		case -1:
			sendOptionsDialogue("Select an Option", "Make my own planks.", "Buy the planks.");
			stage = 1;
			break;
		case 1:
			switch (componentId) {
			case OPTION_1:
				player.getInterfaceManager().sendInterface(403);
				MakePlank.setIcomponents(player);
				end();
				break;
			case OPTION_2:
				ShopsHandler.openShop(player, 12);
				end();
				break;
			}
		}
	}

	@Override
	public void finish() {
		// TODO Auto-generated method stub
		
	}
	
}